﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace lcs.Web.Outstorage
{
    public partial class CheckOutList : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Bind(4);
            }
        }

        private void Bind(int check_user_id)
        {
            lcs.BLL.out_storageList o = new BLL.out_storageList();

            DataSet ds = o.GetCheckUser(" check_user_id=" + check_user_id +" and status > 0 ");

            this.GridView1.DataSource = ds;
            this.GridView1.DataBind();
        }

        protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName == "check")
            {
                if (e.CommandArgument != null)
                {
                    Session.Remove("proid");//去除以前的记录

                    string proid = e.CommandArgument.ToString();

                    Session["proid"] = proid;
                    //ClientScript.RegisterStartupScript(this.GetType(), "", "<script>f_open('"+proid+"')</script>");
                    ClientScript.RegisterStartupScript(this.GetType(), "", "<script>OpenPop('FramePopCheckStorageList.aspx','900px','390px');</script>");
                }
            }
        }

        protected void btn_reload_Click(object sender, EventArgs e)
        {
            ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('sadfasdf')</script>");
        }

    }
}